<?php

namespace App\Console;

use App\Console\Commands\ActiveExpCmd;
use App\Console\Commands\AutoCleanCmd;
use App\Console\Commands\DelCfgCmd;
use App\Console\Commands\ImportCmd;
use App\Console\Commands\TestCmd;
use App\Console\Commands\ExportCmd;
use App\Console\Commands\DelOrderCmd;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use App\Console\Commands\ForbiddenExpCmd;
use App\Console\Commands\TradeCmd;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        TestCmd::class,
        ImportCmd::class,
        ExportCmd::class,
        DelOrderCmd::class,
        ForbiddenExpCmd::class,
        ActiveExpCmd::class,
        DelCfgCmd::class,
        TradeCmd::class,
        AutoCleanCmd::class,
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('order:del')->everyMinute()->withoutOverlapping();
        $schedule->command('order:export')->everyMinute()->withoutOverlapping();
        $schedule->command('order:import')->everyMinute()->withoutOverlapping();
        $schedule->command('trade:upd')->everyMinute()->withoutOverlapping();
    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
